/**
 * Description:一些注释<br/>
 * CreateTime:2019-03-25<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
package cn.cnsy123.bookwebsiteserver.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Description:一些注释<br/>
 * CreateTime:2019-03-25<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
@Entity
@Table(name = "BOOK_SYSTEM_LOGIN_OPTLOG")
public class SysLoginHistoryInfo {
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "OPT_ID")
    private Long optId;

    @Column(name = "OPT_USER",length = 20)
    private String optUser;
    
    @Lob
    @Column(name = "MESSAGE_BODY")
    private String optMessage;
    
    @Column(name = "RECORD_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date recordTime;
    
    @Column(name = "OPT_LAST_IP")
    private String optLastIP;

    public Long getOptId() {
        return optId;
    }

    public void setOptId(Long optId) {
        this.optId = optId;
    }

    public String getOptUser() {
        return optUser;
    }

    public void setOptUser(String optUser) {
        this.optUser = optUser;
    }

    public String getOptMessage() {
        return optMessage;
    }

    public void setOptMessage(String optMessage) {
        this.optMessage = optMessage;
    }

    public Date getRecordTime() {
        return recordTime;
    }

    public void setRecordTime(Date recordTime) {
        this.recordTime = recordTime;
    }

    public String getOptLastIP() {
        return optLastIP;
    }

    public void setOptLastIP(String optLastIP) {
        this.optLastIP = optLastIP;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("\"SysLoginHistoryInfo\":{\"optId\":");
        builder.append(optId);
        builder.append(", optUser\":");
        builder.append(optUser);
        builder.append(", optMessage\":");
        builder.append(optMessage);
        builder.append(", recordTime\":");
        builder.append(recordTime);
        builder.append(", optLastIP\":");
        builder.append(optLastIP);
        builder.append("}");
        return builder.toString();
    }
    
    
}
